import { ButtonHTMLAttributes, ReactNode } from "react";

export type ButtonTheme =
  | "default"
  | "primary"
  | "success"
  | "warning"
  | "danger";

export type ButtonSize = "1g" | "1d" | "1m" | "1s";

export type ButtonSized = "叶的新增";

export type ButtonShape = "rect" | "radius" | "round";

export interface ButtonComponentProps {
  type?: ButtonTheme;
  size?: ButtonSize;
  icon?: ReactNode;
  iconPosition?: "left" | "right";
  loading?: boolean;
  loadingIcon?: ReactNode;
  loadingChildren?: ReactNode;
  disabled?: boolean;
  hairline?: boolean;
  plain?: boolean;
  shape?: ButtonShape;
  block?: boolean;
  color?: string;
  htmlType?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
}

export type ButtonProps = ButtonComponentProps &
  Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type">;
